<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>地下室自查记录</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        .recording-header {
            display: -webkit-flex;
            display: flex;
            justify-content: space-around;
            padding: 5px 0;
        }

        .recording-header>div {
            width: 33%;
            text-align: center;
            font-size: 16px;
        }

        .middle-wrapper>.middle-wrapper-body {
            display: -webkit-flex;
            display: flex;
            justify-content: space-around;
            padding: 2px 0;
        }

        .middle-wrapper>.middle-wrapper-body>div {
            width: 100%;
            height: 20px;
            line-height: 20px;
            font-size: 14px;
            text-align: center;
        }

        .middle-wrapper>.middle-wrapper-body>div:nth-child(1) {
            text-align: right;
            padding-right: 20px;
            box-sizing: border-box;
        }

        .recording-wrapper {
            width: 85%;
            border-radius: 10px;
            background-color: #fff;
            -moz-box-shadow: 1px 4px 20px #C2C2C2;
            -webkit-box-shadow: 1px 4px 20px #C2C2C2;
            box-shadow: 1px 4px 20px #C2C2C2;
            padding: 10px 0;
            margin: 20px auto;
        }

        #app {
            padding-top: 10px;
        }

        .font-color {
            color: #666 !important;
        }

        .images {
            width: 20px;
            height: 20px;
            vertical-align: middle;
        }
    </style>
</head>

<body>
    <main id="app">
        <section class="recording-container" id="HoBasementSelf">
           
        </section>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript">
    //调用vue中的过滤器，固定第一个参数为传入的要处理的数据data
    //Vue.filter('过滤器的名称',function(data){});
    //进行时间的格式化
    Vue.filter('dateFormat', function (dateStr, time) {
        //得到特定的时间
        var date = new Date(dateStr);
        var year = date.getFullYear();
        //ES6语法填充：var month = (date.getMonth()+1).toString().padStart(2, '0');
        var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
        var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
        var hh = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
        var mm = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
        var ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();

        //return `${year}-${month}-${day}`;

        if (time && time.toLowerCase() === 'yyyy-mm-dd') {
            return `${year}-${month}-${day}`;
        } else if (time && time.toLowerCase() === 'hh:mm:ss') {
            return `${hh}:${mm}:${ss}`;
        } else {
            return `${year}-${month}-${day} ${hh}:${mm}:${ss}`;
        }
    });
    apiready = function () {
        var vm = new Vue({
            el: '#app',
            data: {
                searchInfo: '',
                DisinfectionRecord: [], //消毒记录信息
                Url_IP: ""
            },
            created() {
                //获取所属医院IP地址
                var Url_IP = ToConfigure_IP("Gorgeous");
                //定义toast提示框
                var toast = new auiToast();
                //清空页面内容
                $("#HoBasementSelf").html("");
                //拼接字符串
                var HoBasementSelf = "";
                var jsParms = new Object();
                jsParms.currPage = 1;
                $.ajax({
                    url: Url_IP + '/disinfectioninspection/basementself/getHoBasementSelf',
                    type: 'post',
                    async: false,
                    contentType: "application/json",
                    dataType: "json",
                    data: JSON.stringify(jsParms),
                    success: function (result) {
                        /**
                         * 验证返回信息是否为空
                         */
                        if (result.success == true) {
                            /**
                             *  循环object
                             */
                            $.each(result.data.list, function (i, o) {
                                
                                HoBasementSelf += "<div class='recording-wrapper' >";
                                HoBasementSelf += "<div class='recording-header'>";
                                HoBasementSelf += "<div>";
                                HoBasementSelf += "<span>地下室自查记录</span>";
                                HoBasementSelf += "</div>";
                                HoBasementSelf += "</div>";
                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>检查日期：</span></div><br>";
                                if (o.bsTime != "" && o.bsTime != null) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>日期："+o.bsTime+"</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>日期：暂无</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsAutograph != "" && o.bsAutograph != null) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>签名："+o.bsAutograph+"</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>签名：暂无</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"


                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>治疗舱：</span></div><br>";
                                if (o.bsFilterTreat == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气过滤器：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气过滤器：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsDiaphragmTreat == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>气动薄膜阀：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>气动薄膜阀：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"

                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>过渡舱：</span></div><br>";
                                if (o.bsFilterTransition == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气过滤器：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气过滤器：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsDiaphragmTransition == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>气动薄膜阀：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>气动薄膜阀：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"

                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>抢救舱：</span></div><br>";
                                if (o.bsFilterRescue == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气过滤器：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气过滤器：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsDiaphragmRescue == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>气动薄膜阀：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>气动薄膜阀：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"


                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>其他：</span></div><br>";
                                if (o.bsElectricAspirator == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>电动吸引器：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>电动吸引器：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsPiping == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>各管路、管线：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>各管路、管线：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"



                                HoBasementSelf += "<div class='recording-header'>";
                                HoBasementSelf += "<div>";
                                HoBasementSelf += "<span>高压氧科</span>";
                                HoBasementSelf += "</div>";
                                HoBasementSelf += "</div>";
                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><br>";
                                    if (o.bsAirCompressor == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气压缩机Ⅰ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气压缩机Ⅰ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsAirCompressores == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气压缩机Ⅱ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>空气压缩机Ⅱ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsColdDryer == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>冷干机Ⅰ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>冷干机Ⅰ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"

                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><br>";
                                if (o.bsColdDryeres == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>冷干机Ⅱ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>冷干机Ⅱ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsAirTank == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>储气罐Ⅰ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>储气罐Ⅰ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsAirTankes == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>储气罐Ⅱ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>储气罐Ⅱ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"
                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><br>";
                                if (o.bsAirTankess == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>储气罐Ⅲ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>储气罐Ⅲ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsWaterSepar == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>油水分离器Ⅰ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>油水分离器Ⅰ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                if (o.bsWaterSepares == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>油水分离器Ⅱ：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>油水分离器Ⅱ：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div>"
                                HoBasementSelf += "<div class='middle-wrapper'><div class='middle-wrapper-body'><br>";
                                    if (o.bsWaterPipe == 1) {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>消防水罐：✔</span>";
                                    HoBasementSelf += "</div>";
                                } else {
                                    HoBasementSelf += "<div class='font-color'>";
                                    HoBasementSelf += "<span>消防水管：✖</span>";
                                    HoBasementSelf += "</div>";
                                }
                                HoBasementSelf += "</div></div></div>";
                            });
                            //页面赋值
                            $("#HoBasementSelf").html(HoBasementSelf);
                        }
                    }
                })
            }

        })
    }
</script>